<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>财务结算记录</title>
    <link href="../../rs/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="../../rs/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="../../rs/plugins/bootstrap_tab/css/bootstrap-table.css" rel="stylesheet">
    <link href="../../rs/css/animate.min.css" rel="stylesheet">
    <link href="../../rs/css/style.min862f.css?v=4.1.0" rel="stylesheet">
    <link href="../../rs/plugins/datapicker/datepicker3.css" rel="stylesheet">
    <link href="../../rs/plugins/bootstrap-editable/css/bootstrap-editable.css" rel="stylesheet">
    <?php require_once('login.php'); ?>
    <style>
        .input-daterange{width: 100%;}
        .m-b-xs{
            padding-right: 0px;
            padding-left: 0px;
        }
        .editable-click, a.editable-click, a.editable-click:hover {
            border-bottom: 0px;
        }
        .fixed-table-pagination .page-list{
            display: none;
        }
        .border0{border:0px}
    </style>

</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">

    <!-- Panel Other -->
    <div class="ibox float-e-margins">
        <div class="ibox-content form-inline">
            <div class="col-sm-6 m-b-xs">
                <div class="form-group" id="data_5">
                    <div class="input-daterange input-group" id="datepicker">
                        <input style="height:34px" type="text" class="input-sm form-control" name="start" value="" id="start"/>
                        <span style="background: #E5E6E7;" class="input-group-addon">到</span>
                        <input style="height:34px" type="text" class="input-sm form-control" name="end" value="" id="end"/>
                        <span id="search" style="background: #E5E6E7;cursor:pointer" class="input-group-addon">查找</span>
                    </div>
                </div>
            </div>
            <div class="col-sm-4 m-b-xs"></div>         
            <div class="col-sm-1 m-b-xs"></div>
            <table id="table">
            </table>
            <!-- End Example Card View -->
        </div>
    </div>
</div>
<!-- End Panel Other -->
<script src="../../rs/js/jquery.min.js"></script>
<script src="../../rs/js/bootstrap.js"></script>
<script src="../../rs/plugins/bootstrap_tab/js/bootstrap-table.min.js"></script>
<script src="../../rs/plugins/bootstrap_tab/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
<script src="../../rs/plugins/datapicker/bootstrap-datepicker.js"></script>
<script src="../../rs/plugins/bootstrap_tab/js/bootstrap-table-export.js"></script>
<script src="../../rs/plugins/bootstrap_tab/js/tableExport.js"></script>
<script src="../../rs/js/jquery.cookie.js"></script>
<script src="../../rs/js/common_qj.js"></script>
<script src="../../rs/js/store.min.js"></script>  <!-- 打印面单js -->
<script src="../../rs/plugins/layer/layer.min.js"></script>
<script src="../../rs/plugins/bootstrap-editable/js/bootstrap-editable.js"></script>
<script src="../../rs/plugins/bootstrap-editable/js/bootstrap-table-editable.min.js"></script>
<script type="text/javascript">
    var $table = $('#table');
    var sign=URLencode($.cookie('sign'));
//    当天的前一天
//    var rq1=(new Date(new Date()-0 - 1*86400000)).format( 'yyyy-MM-dd')+' 00:00:00';

    var dtn={};
    $(function(){

        var start=(new Date(new Date()-0 - 7*86400000)).format( 'yyyy-MM-dd');
        var end=(new Date()).format( 'yyyy-MM-dd');
        $('#start').val(start);
        $('#end').val(end);
        $('#table').bootstrapTable({
            columns: [
               
                {
                    field: 'djbh',
                    title: '单据编号',
                },
                {
                    field: 'djje',
                    title: '单据金额'
                },                    
                
                {
                    field: 'ysje',
                    title: '实收金额'
                },
                 {
                    field: 'bz',
                    title: '备注'
                }
                
            ],
            advancedSearch:true,
            clickToSelect:true,
            showExport:true,
        }); 
    });
    //    日期插件js开始
    $("#data_5 .input-daterange").datepicker({keyboardNavigation: !1, forceParse: !1, autoclose: !0});
    var config = {
        ".chosen-select": {},
        ".chosen-select-deselect": {allow_single_deselect: !0},
        ".chosen-select-no-single": {disable_search_threshold: 10},
        ".chosen-select-no-results": {no_results_text: "Oops, nothing found!"},
        ".chosen-select-width": {width: "95%"}
    };
    //    日期插件js结束
//查找数据
    $("#search").click(function(){
        f_s();
    });
    function  f_s(){
        var rq1=$("input[name='start']").val();
        var rq2=$("input[name='end']").val();
       
        //layer.msg('数据加载中...', {icon: 16, time: 200000, shade: [0.1, 'black']});
        $.ajax({
            type: "post",
            url: G_url+'filg/query/'+rq1+'/'+rq2,
            data:'sign='+sign,
            dataType: "json",
            success: function (aftdata){

                dtn=aftdata;
                if(aftdata.order.length==0){
                    layer.msg("数据为空！");
                };
                $('#table').bootstrapTable('load',dtn.order);
                layer.closeAll();
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
            }
        });
    }
  
    
   
</script>
</body>
</html>
